<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>用户列表</title>
    <link href="/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="/js/jquery.min.js" type="text/javascript"></script>
    <script src="/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
    <div class="container">
        <h1 class="text-center">用户（点名人）列表</h1>
        <table class="table table-striped table-hover table-bordered">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>姓名</th>
                    <th>已点名次数</th>
                </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>

    <script type="text/javascript">
        $(function() {
            $.get(
                "/user/list",
                function(data) {
                    for (var i in data) {
                        var tr = $("<tr></tr>");
                        tr.append("<td>" +data[i].id+ "</td>");
                        tr.append("<td>" +data[i].name+ "</td>");
                        tr.append("<td>" +data[i].checkNum+ "</td>");
                        $("tbody").append(tr);
                    }
                }
            );
        });
    </script>
</body>
</html>
